/**
 * @desc 用户管理接口
 */
import request from '@/utils/request'
// 获得企业用户列表分页
export function getCompanyUser(query) {
  return request({
    url: '/member/company/user/page',
    method: 'post',
    data: query
  })
}
// 获得企业管理分页
export function getCompanyPage(query) {
  return request({
    url: '/member/company/page',
    method: 'get',
    params: query
  })
}
// 企业认证审核
export function companyAuthentication(query) {
  return request({
    url: '/member/company/company/authentication',
    method: 'post',
    data: query
  })
}
// 创建企业
export function createCompany(query) {
  return request({
    url: '/member/company/create',
    method: 'post',
    data: query
  })
}
// 删除企业用户
export function deleteCompanyUser(userId) {
  return request({
    url: '/member/company/delete',
    method: 'delete'
  })
}
// 修改企业数据
export function updateCompany(data) {
  return request({
    url: '/member/company/update',
    method: 'put',
    data: data
  })
}
// 删除企业，（删除企业管理员调用该接口）
export function deleteCompany(id) {
  return request({
    url: '/member/company/delete?id=' + id,
    method: 'delete'
  })
}
// 删除企业普通用户
export function delUser(userId) {
  return request({
    url: '/system/user/delete?id=' + userId,
    method: 'delete'
  })
}
// 删除banner管理
export function deleteBanner(id) {
  return request({
    url: '/member/banner/delete?id=' + id,
    method: 'delete'
  })
}
// 获得招聘统计数据
export function getJobAndinvitCount(query) {
  return request({
    url: '/recruitCompany/admin/getJobAndinvitCount',
    method: 'get',
    params: query
  })
}
// 获得企业详情
export function getCompanyInfo(query) {
  return request({
    url: '/member/company/oper-get',
    method: 'get',
    params: query
  })
}
// 获取用户详情
export function getUserInfo(query) {
  return request({
    url: '/system/user/get',
    method: 'get',
    params: query
  })
}
// 获得企业用户列表的用户详情，包含用户+企业的信息
export function getCompanyUserInfo(data) {
  return request({
    url: '/member/company/user/get',
    method: 'post',
    data: data
  })
}
// 删除企业用户列表的用户详情，包含用户+企业的信息
export function deleteCompanyUserInfo(data) {
  return request({
    url: '/member/company/user/delete',
    method: 'delete',
    data: data
  })
}

// 招聘企业更新榜单
export function updateRankingStatus(data) {
  return request({
    url: '/recruitCompany/updateRankingStatus',
    method: 'put',
    data
  })
}
